package com.dollar.juc.lock;

import java.util.concurrent.ThreadPoolExecutor;

public class SpinLockTest {
    public static void main(String[] args) throws InterruptedException {

        Counter counter = new Counter();
        for (int i = 0; i < 3; i++) {
            new Thread(() -> counter.add10000()).start();
        }

        Thread.sleep(3000);
        System.out.println("cnt: " + counter.cnt);
    }
}
